import { Next, Request, Response } from "restify";
import { getCustomRepository } from "typeorm";

import { PowerRepository } from "@src/apps/goods/repositories/power.repository";

export class PowerController {
  getAll(req: Request, res: Response, next: Next): void {
    getCustomRepository(PowerRepository)
      .getAll()
      .then(r => res.send(r))
      .catch(next);
  }
  getIpById(req: Request, res: Response, next: Next): void {
      res.send({
          user: req.body
      })
  }
}